add 'nourl' option to an1 format
authorparkrrrr <parkrrrr>
Mon, 14 May 2007 14:18:18 +0000 (14:18 +0000)
committerparkrrrr <parkrrrr>
Mon, 14 May 2007 14:18:18 +0000 (14:18 +0000)
an1.c
xmldoc/formats/options/an1-nourl.xml [new file with mode: 0644]

diff --git a/an1.c b/an1.c
index 684579598ddfd7b118f1914622de571b2d4ae803..e27603055e7384b87a96455f52d1590c9256500a 100644 (file)
--- a/an1.c
+++ b/an1.c
@@ -33,6 +33,7 @@ static FILE *outfile;
 static char *output_type = NULL;
 static char *road_changes = NULL;
 static char *nogc = NULL;
+static char *nourl = NULL;
 static char *opt_symbol = NULL;
 static char *opt_color = NULL;
 static char *opt_zoom  = NULL;
@@ -64,6 +65,8 @@ arglist_t an1_args[] = {
                "", ARGTYPE_STRING, ARG_NOMINMAX },
        {"nogc", &nogc, "Do not add geocache data to description",
                NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
+       {"nourl", &nourl, "Do not add URLs to description",
+               NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
        {"deficon", &opt_symbol, "Symbol to use for point data",
                "Red Flag", ARGTYPE_STRING, ARG_NOMINMAX },
        {"color", &opt_color, "Color for lines or mapnotes",
@@ -797,7 +800,7 @@ Write_One_AN1_Waypoint( const waypoint *wpt )
                xfree( extra );
        }
        
-       if ( wpt->url ) {
+       if ( !nourl && wpt->url ) {
                int len = 7+strlen(wpt->url);
                char *extra = (char *)xmalloc( len );
                sprintf( extra, "{URL=%s}", wpt->url );
diff --git a/xmldoc/formats/options/an1-nourl.xml b/xmldoc/formats/options/an1-nourl.xml
new file mode 100644 (file)
index 0000000..e4504df
--- /dev/null
@@ -0,0 +1,12 @@
+<para>
+If your original waypoint data contains URLs, GPSBabel will include them as
+links in the generated drawing file.  This causes the waypoint symbol to have
+a blue border, and it causes the waypoint text to be drawn in blue with an 
+underline.
+</para>
+<para>
+If you do not want this behavior, specify the "nourl" option on the command
+line:
+</para>
+<para><userinput>gpsbabel -i gpx -f 12345.gpx -o an1,nourl -F 12345.an1</userinput></para>
+